package dst.graph;

import java.util.Iterator;

/**
 * Classes implementing this interface can call Graph's tree searching
 * functions such as depth-first search and breadth-first search.
 * 
 * @author Shimu
 * @date 3-Oct-2012
 */
public interface GraphSearchable<T> extends GraphNodeInterface<T> {

    /** Set the color of this GraphSearchable */
    public void setColor(int color);

    /** Get the color of this GraphSearchable */
    public int getColor();

    /** 
     * Return the GraphSearchable that discovered this GraphSearchable
     * first during the graph search.
     */
    public GraphSearchable<T> getDiscoverer();

    /**
     * Sets the GraphSearchable that discovered this GraphSearchable
     * first during the graph search.
     * @param discoverer 
     */
    public void setDiscoverer(GraphSearchable<T> discoverer);

    /** Returns an iterator over the neighbours of this GraphNodeInterface */
    @Override
    public Iterator<? extends GraphSearchable<T>> getNeighbours();
}
